package com.colin.springbootsource.ioc.xml;

/**
 * @author: Colin
 * 2019/12/29 18:36
 * @desc todo
 * @email zhaod@oceansoft.com.cn,colinzhaodong@gmail.com
 */
public class AnimalFactory {
    public static Animal getAnimal(String type){
        if (AnimalEnum.Dog.getName().equals(type)){
            return new Dog();
        }else {
            return new Cat();
        }
    }

}
